// function rawurlencode(str) {
// 	str = (str + '').toString();
// 	return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A');
// }

function doSubmit(){

	if (document.forms['search']['moviename'].value.replace(/\s/g, '').length == null) {
        // 将鼠标的焦点聚焦控制在文本框中
		document.forms['search']['moviename'].focus();
        return false;
	}else{
		value = document.forms['search']['moviename'].value;
	    // var name ='/search/' + value+'/'+ 1 +'/';
        // var encodeData = encodeURI(name)
        // document.forms['search'].action = '%s'%(encodeData);
        // // document.forms['search'].action = '/search/' + rawurlencode(encodeData)+'/';
        // // 获取名为search的forms表单，提交
        // document.forms['search'].submit();
        var name =value;

        var encodeData = encodeURIComponent("?name="+ name)
        document.forms['search'].action = '/search/' + encodeData +'&'+1+'/'															;
        // document.forms['search'].action = '/search/' + rawurlencode(encodeData)+'/';
        // 获取名为search的forms表单，提交
        document.forms['search'].submit();
	}
}